<{Tinclude "commom/admin_header"}>
 <section id="container" >


      <!--顶部-->
      <{Tinclude"commom/admin_inner_header"}>
      <!--顶部-->
      
       <{Tinclude"commom/admin_left_menu"}>
    <section id="main-content">
          <section class="wrapper">
            <h3><i class="fa fa-angle-right"></i> 房租</h3>
              <div class="row mt">
                  <div class="col-lg-12 jpbox">
                   
                   
                  </div>
                  <div class="col-lg-12">
                      <div class="row">
                         
                          
<{if isset($rent_item)&&$rent_item}>
<{foreach $rent_item as $v}>
<div class="col-lg-4 col-md-4 col-sm-4 mb">
<div class="steps pn">
<label>房间:<{$room["build_name"]}>,<{$room["layer_id"]}>楼,<{$room["room_no"]}>号,租户:<{$v["user_name"]}> </label>
<label><{$rent["year"]}>年<{$rent["month"]}>月-<{echo date("Y年m月d日",$rent["effective_time"]);}></label>
<label>租金缴纳:<{$v["rent"]}>元</label>
<{if $v["dian_price"]>0}><label>电费缴纳:<{$v["dian_price"]}>元</label><{else}><label>电费:暂无</label><{/if}>
<{if $v["water_price"]>0}><label>水费缴纳:<{$v["water_price"]}>元</label><{else}><label>水费:暂无</label><{/if}>
<{if $rent["is_deposit"]>0}><label>押金:<{if $roomrluser["deposit_pay_status"]==0}><{$roomrluser["deposit"]}>元<{else}>无<{/if}></label><{else}><label>无</label><{/if}>
<label>总金额:<{echo ($v["rent"]+$v["dian_price"]+$v["water_price"]);}>元</label>
<{if $rent["is_payfinsh"]==0}><div data-rentid="<{$rent["id"]}>" data-isdeposit="<{if $rent["is_deposit"]>0}>1<{else}>0<{/if}>" data-rentitemid="<{$v["id"]}>" class="gopay confirmjiaozu">确认收租</div>
<{else}>
<div class="gopay">已完成</div>
<{/if}>
</div>
</div>

<{/foreach}>
<{else}>
 <div class="col-md-12 col-xs-12">
 <h4 class="text-center">数据为空</h4>
</div>
<{/if}>
                          
                          
                          
                          
                          
                      </div>
                  </div>
                  
              </div>
          </section>
    </section>
 </section>
<script>
    $(".confirmjiaozu").click(function(){
        var thisObj=$(this);
        var rentid=thisObj.data("rentid");
        var isdeposit=thisObj.data("isdeposit");
        var rentitemid=thisObj.data("rentitemid");
        var url="<{echo Common::RewriteUrl("Rental","public_ajax_confirmjiaozu");}>";
        $.post(url,{"rentid":rentid,"isdeposit":isdeposit,"rentitemid":rentitemid},function(data){
            if(data.status<0){
                alert(data.msg);
            }else{
                var parentObj=thisObj.parent().parent();
                var pObj=parentObj.parent();
                
                parentObj.fadeOut("normal",function(){
                    parentObj.remove();
                    var pObjchildren=pObj.children();
                    if(pObjchildren.length==0){
                        pObj.html('<div class="col-md-12 col-xs-12"><h4 class="text-center">数据为空</h4></div>');
                    }
                });
            }
        },"json");
    });
</script>
<{Tinclude"commom/jisuandianfei_form"}>
<{Tinclude"commom/jisuanshuifei_form"}>
<{Tinclude"commom/admin_footer"}>